package com.lancoo.edu.platform.operation.commons.controller;

import com.lancoo.edu.platform.operation.commons.controller.base.BaseResultController;
import com.lancoo.edu.platform.operation.commons.dto.BaseResult;
import com.lancoo.edu.platform.operation.commons.service.api.UserInfoApiService;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 应用信息控制器
 * @author yjk
 */
@RestController
@AllArgsConstructor
@RequestMapping(value = "api/common")
public class ApplicationInfoController extends BaseResultController {

    // private final AppIdentityBoService appIdentityBoService;
    private final UserInfoApiService userInfoApiService;


    // /**
    //  * 获取分配给用户的应用信息
    //  * @param userId 用户ID
    //  * @param userType 用户类型
    //  * @param identityCode 身份代码
    //  * @param eduId 教育局ID
    //  * @param keyword 关键字
    //  * @return 应用列表
    //  */
    // @GetMapping(value = "/user/application/list")
    // public BaseResult getUserApplicationList(String userId, Integer userType, String identityCode, String eduId, String keyword){
    //     return success(appIdentityBoService.getAppByIdentity(userId, userType, identityCode, eduId, keyword));
    // }

    /**
     * 获取所有类型用户类型列表
     * @param eduId 教育局ID
     * @return 用户类型列表
     */
    @GetMapping(value = "/user/type")
    public BaseResult getAllType(String eduId) {
        return success(userInfoApiService.getAllTypeIdentity(eduId));
    }

}
